{template "header.html"}


<script>

    // 加入书架
    function dr_module_book(dir, id) {
        $.get("/index.php?is_ajax=1&s="+dir+"&c=show&m=cart&id="+id, function(data){
            dr_tips(data.code, data.msg);
            if (data.code) {
                $('#module_book_'+id).html(data.data);
            }
        }, 'json');
    }
</script>
<div class="page-content">

    <div class="container">

        <ul class="page-breadcrumb breadcrumb">
            <li class="symbol-title">
                <a href="{SITE_URL}">网站首页</a>
                <i class="fa fa-circle"></i>
            </li>
            {dr_catpos($catid, '', true, '<li> <a href="[url]">[name]</a> <i class="fa fa-circle"></i> </li>')}
            <li>
                <span>{$title}</span>
            </li>
        </ul>


    </div>

    <div class="container margin-top-30">


        <div class="row">

            <div class="col-md-9">
                <div class="row">
                    <div class="col-md-3">

                        <div class="book_left">
                            <img src="{dr_thumb($thumb, 150, 220)}">
                            <div class="{if $zt}zt1{else}zt0{/if}"></div>
                        </div>

                        <div class="book_sns">

                            <a href="javascript:dr_module_digg('{MOD_DIR}', '{$id}', 1);" class="btn btn-circle btn-icon-only green">
                                <i class="fa fa-thumbs-o-up"></i>
                            </a>
                            <span class="badge badge-success" id="module_digg_{$id}_1"> {intval($support)} </span>

                            <a href="javascript:dr_module_digg('{MOD_DIR}', '{$id}', 0);" class="btn btn-circle btn-icon-only red">
                                <i class="fa fa-thumbs-o-down"></i>
                            </a>
                            <span class="badge badge-danger" id="module_digg_{$id}_0"> {intval($oppose)} </span>


                        </div>

                    </div>
                    <div class="col-md-9">
                        <div class="bookname">{$title} <small>{$biming}</small></div>
                        <div class="bookinfo">
                            分类：{$cat.name} <i>|</i>
                            收藏：{intval($favorites)} <i>|</i>
                            评论：{$comments} <i>|</i>
                            更新：{$updatetime} <i>|</i>
                            人气：{dr_show_hits($id)}
                        </div>
                        <div class="bookdesc">
                            {$description}
                        </div>
                        <p>
                            {if $price > 0}
                            <a href="{$son_url}" target="_blank" class="btn btn-circle2 blue"> 免费阅读 </a>
                            <a href="{dr_url('book/buy/index', ['fid' => $ci->module['field']['price']['id'],'id'=>$id])}" target="_blank" class="btn btn-circle2 red"> 购买VIP（¥{$price}） </a>
                            {else}
                            <a href="{$son_url}" target="_blank" class="btn btn-circle2 red"> 免费阅读 </a>
                            {/if}
                            <a href="javascript:dr_module_book('{MOD_DIR}', '{$id}');" class="btn btn-circle2 dark btn-outline"> 加入书架 </a>
                            <a href="{Router::donation_url($id)}" class="btn btn-circle2 green btn-outline"> 打赏作者 </a>
                        </p>


                    </div>
                </div>
                <div class="row">
                    <div class="portlet light" style="margin-bottom: 0">
                        <div class="portlet-title">
                            <div class="caption">
                                <span class="caption-subject font-dark">图书目录</span>
                            </div>
                            <div class="actions">
                                <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title="全屏查看"> </a>
                            </div>
                        </div>
                        <div class="portlet-body">


                            <div class="panel-group accordion scrollable" id="accordion">

                                {loop $son_type $tid $name}
                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h4 class="panel-title">
                                            <a class="accordion-toggle {if $tid>0}collapsed{/if}" data-toggle="collapse" data-parent="#accordion" href="#collapse_{$tid}"> {$name} </a>
                                        </h4>
                                    </div>
                                    <div id="collapse_{$tid}" class="panel-collapse  {if $tid>0}collapse{else}in{/if}">

                                        <ul class="booklist clearfix">
                                        {loop $son_list[$tid] $t}
                                            <li>
                                                <a href="{$t.url}" target="_blank"class="qh">{$t.title}</a>
                                                {if $t.vip}<span class="vip">VIP</span>{else}<span class="free">免费</span>{/if}
                                            </li>
                                        {/loop}
                                        </ul>
                                    </div>
                                </div>
                                {/loop}

                            </div>


                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="portlet light">
                        <div class="portlet-title">
                            <div class="caption">
                                <span class="caption-subject font-dark">内容简介</span>
                            </div>
                        </div>

                        <div class="portlet-body">
                            {$content}
                        </div>
                    </div>
                </div>
                {if IS_COMMENT}
                <div class="row">
                    <div class="portlet light">
                        <div class="portlet-title">
                            <div class="caption">
                                <span class="caption-subject font-dark">网友评论</span>
                            </div>
                        </div>
                        <div class="portlet-body">
                            {dr_module_comment(MOD_DIR, $id)}
                        </div>
                    </div>
                </div>
                {/if}

            </div>

            <div class="col-md-3">

                <div class="portlet light">
                    <div class="portlet-title">
                        <div class="caption">
                            <span class="caption-subject font-dark">相关书籍</span>
                        </div>
                    </div>
                    <div class="portlet-body">
                        <div class="todo-project-list">
                            <ul class="nav nav-stacked">
                                <!--此标签用于调用相关文章，tag=关键词1,关键词2，多个关键词,分隔，num=显示条数，field=显示字段-->
                                {related module=MOD_DIR field=title,url tag=$tag num=10}
                                <li>
                                    <a href="{$t.url}" title="{$t.title}">
                                        <span class="badge fc-icon-left {$a[array_rand($a)]}"> {$key+1} </span>
                                        {dr_strcut($t.title, 23)}</a>
                                </li>
                                {/related}
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="portlet light">
                    <div class="portlet-title">
                        <div class="caption">
                            <span class="caption-subject font-dark">版权声明</span>
                        </div>
                    </div>
                    <div class="portlet-body">
                        《{$title}》由作者{$biming}于 {dr_date($_inputtime, 'Y-m-d')} 创建并上传，{SITE_NAME}提供网络空间。如发现该作品上传人有侵权行为请及时与我们联系。
                    </div>
                </div>
            </div>



        </div>

    </div>

</div>

{template "footer.html"}